
<div id="menuitem-add-edit">
    <div class="title">
        修改菜单项信息
    </div>
    <form action="__APP__/MenuItem/update" method="post">

                <input type="hidden" name="id" value="<{$data.id}>" />
                <input type="hidden" name="mid" value="<{$data.menuid}>" />

        <empty name="Think.get.miid">
                <eq name="Think.get.type" value="custom">
                    <input type="hidden" name="selectid" value="0" />
                </eq>
            <else/>
                <input type="hidden" name="selectid" value="<{$Think.post.sid}>" />
        </empty>

        <table>


            <empty name="Think.get.miid">
                <tr><th>菜单项名称：</th><td><input type="text" name="name" value="<{$data.name}>" /></td></tr>
            <else/>
                <tr><th>菜单项名称：</th><td><input type="text" name="name" value="<{$Think.post.getname}>" /></td></tr>
            </empty>

            <tr><th>别　　　名：</th><td><input type="text" name="alias" value="<{$data.alias}>" /></td></tr>
            <tr><th>排　　　序：</th><td><input type="text" name="sort" value="<{$data.sort}>" /></td></tr>

            <eq name="data.publish" value="1">
                <tr><th>发　　　布：</th><td><input type="radio" checked="checked" name="publish" value="1" />是
                    <input type="radio" name="publish" value="0" />否</td></tr>
                <else/>
                <tr><th>发　　　布：</th><td><input type="radio" name="publish" value="1" />是
                    <input type="radio" name="publish" value="0" checked="checked" />否</td></tr>
            </eq>

            <empty name="Think.get.miid">

                <empty name="Think.get.type" value="custom">
                        <tr><th>类　　　型：</th><td><input type="text" style="border:none;"  name="type" readonly="readonly" value="<{$data.type}>" /></td></tr>
                    <else/>
                        <tr><th>类　　　型：</th><td><input type="text" style="border:none;" name="type" readonly="readonly" value="Custom" /></td></tr>
                </empty>

                    <tr><th>地　　　址：</th><td>
                        <empty name="Think.get.type" value="custom">

                                <eq name="data.type" value="Custom">
                                    <input type="text" name="link" value="<{$data.link}>" />
                                <else/>
                                    <input type="text" readonly="readonly" style="border:none;" name="link" value="<{$data.link}>" />
                                </eq>

                            <else/>
                                <input type="text" name="link" value="<{$data.link}>" />
                        </empty>

                    </td></tr>

            <else/>

                    <tr><th>类　　　型：</th><td><input type="text" name="type" style="border:none;" readonly="readonly" value="<{$componentinfo.model}>" /></td></tr>

                    <tr><th>地　　　址：</th><td>
                        <input type="text" name="link" readonly="readonly" style="border:none;" value="index.php/<{$componentinfo.model}>/<{$componentinfo.action}>/id/<{$Think.post.sid}>" />
                    </td></tr>

            </empty>

            <tr><th style="vertical-align: top;">打开　方式：</th><td>
                <select name="howopen" style="margin:0 0 5px 5px;">
                    <switch name="data.howopen">
                        <case value="0">
                            <option value="0" selected="selected">本页面打开</option>
                            <option value="1">新页面打开</option>
                        </case>
                        <case value="1">
                            <option value="0">本页面打开</option>
                            <option value="1" selected="selected">新页面打开</option>
                        </case>
                        <default/>
                            <option value="0" selected="selected">本页面打开</option>
                            <option value="1">新页面打开</option>
                    </switch>
                </select>
            </td></tr>
            <tr><th style="vertical-align:top;">路　　　径：</th><td>
                <select name="pid" size="18" style="margin-left:5px;width:300px;">
                    <option value="0" selected="selected">根菜单项</option>
                        <volist name="datas" id="vo">
                            <empty name="Think.get.miid">
                                    <if condition="$vo.id eq $data['id']">
                                        <option selected="selected" value="<{$vo.id}>" title="<{$vo.path}>" style="background:yellow;"><{$vo.nbsp}>|-- <{$vo.name}></option>
                                        <else/>
                                        <option value="<{$vo.id}>" title="<{$vo.path}>"><{$vo.nbsp}>|-- <{$vo.name}></option>
                                    </if>
                                <else/>
                                    <eq name="vo.id" value="$Think.get.id">
                                        <option selected="selected" value="<{$vo.id}>" title="<{$vo.path}>" style="background:yellow;"><{$vo.nbsp}>|-- <{$vo.name}></option>
                                        <else/>
                                        <option value="<{$vo.id}>" title="<{$vo.path}>"><{$vo.nbsp}>|-- <{$vo.name}></option>
                                    </eq>
                            </empty>
                        </volist>
                </select>
            </td></tr>
            <tr><td></td><td><input type="submit" class="submit" value="修改菜单项" /></td></tr>
        </table>
    </form>
</div>
<script type="text/javascript" src="../Public/js/menu.js"></script>
